package com.bfly.mall.shop.dto;

import com.bfly.core.config.ResourceConfigure;
import com.bfly.mall.shop.entity.ShopPic;
import org.apache.commons.lang3.StringUtils;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;

/**
 * 门店
 *
 * @author 长沙商脉科技有限公司
 * @date 2020/11/27 19:30
 */
public class ShopFormDTO implements Serializable {


    private static final long serialVersionUID = -2163723274465419148L;
    private int id;

    @NotBlank(message = "门店手机号码不能为空!")
    private String phone;

    @NotBlank(message = "门店名称不能为空!")
    private String name;

    @NotBlank(message = "门店地址不能为空!")
    private String address;

    @NotBlank(message = "门店地址经度不能为空!")
    private String longitude;

    @NotBlank(message = "门店地址维度不能为空!")
    private String latitude;

    private String startTime;

    private String endTime;

    private String remark;
    private String logo;

    private List<ShopPic> pics;

    public List<ShopPic> getPics() {
        return pics;
    }

    public void setPics(List<ShopPic> pics) {
        this.pics = pics;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getUrl() {
        return StringUtils.isNotBlank(getLogo()) ? ResourceConfigure.getResourceHttpUrl(getLogo()) : "";
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }
}
